import QtQuick 2.0
import "./Keyboard"
import "./content"
import "./Manage"

Rectangle {
    id: main_rectangle;
    //    width: 800;
    //    height: 600;
    anchors.fill: parent
    // Put the name of the QML files containing your pages (without the '.qml')
    property variant pagesList  : [
        "Mes",
        "Loginn",
        "main",
        "Manage/Manage_Topic",

    ];

    // Set this property to another file name to change page
    property string  currentPage : "Manage/Manage_Topic";



//        model: pagesList;
//        delegate: Loader {
//            id:laderw
//            active: false;
//            asynchronous: true;
//            anchors.fill: parent;
//            visible: (currentPage === modelData);
//            source: "%1.qml".arg(modelData)
//            onVisibleChanged:      { loadIfNotLoaded(); }
//            Component.onCompleted: { loadIfNotLoaded(); }


//            function loadIfNotLoaded () {
//                // to load the file at first show
//                if (visible && !active) {
//                    active = true;
//                }

//            }
//        }
        Loader{
            id:loaderw
            source:   "Loginn.qml"
            visible: status == Loader.Ready
            asynchronous: true;
            anchors.fill: parent;
        }


    Connections{
        target: loaderw.item
        onEnter:{
            loaderw.source="Mes.qml"

           // console.debug("name");
        }

    }

}
